<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>添加预定 </title>
    <link rel="stylesheet" href="../views/static/common/layui/css/layui.css">
    <link rel="stylesheet" href="../views/static/admin/css/style.css">
    <script src="../views/static/common/layui/layui.js"></script>
    <script src="../views/static/common/jquery-3.3.1.min.js"></script>
    <script src="../views/static/common/vue.min.js"></script>
    <!-- 引入jQuery库 -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <!-- 引入jQuery UI库 -->
    <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>

    <script language="javascript">
        function sumbit_sure(){
            var gnl=confirm("是否确定提交?");
            if (gnl==true){
                return true;
            }else{
                return false;
            }
        }
    </script>
    <style>
        #datepicker {
            margin-top: 10px;
        }
    </style>

</head>
<body>
<div id="app">
    <!--顶栏-->
    <header>
        <div style="float:left;"><img src="../views/static/admin/img/tubiao.png" width="152" height="55" /></div>
        <div style="float: right">
            <i  class="layui-icon  layui-anim layui-anim-rotate layui-anim-loop" style="font-size: 30px; color: #969baa;">&#xe614;</i>&nbsp; &nbsp; &nbsp;
        </div>
    </header>

    <div class="main" id="app">
        <!--左栏-->
        <div class="left">
            <ul class="cl" >
                <!--顶级分类-->
                <li v-for="vo,index in menu" :class="{hidden:vo.hidden}">
                    <a href="javascript:;"  :class="{active:vo.active}"  @click="onActive(index)">
                        <i class="layui-icon" v-html="vo.icon"></i>
                        <span v-text="vo.name"></span>
                        <i class="layui-icon arrow" v-show="vo.url.length==0">&#xe61a;</i> <i v-show="vo.active" class="layui-icon active">&#xe623;</i>
                    </a>
                    <!--子级分类-->
                    <div v-for="vo2,index2 in vo.list">
                        <a href="javascript:;" :class="{active:vo2.active}" @click="onActive(index,index2)" v-text="vo2.name"></a>
                        <i v-show="vo2.active" class="layui-icon active">&#xe623;</i>
                    </div>
                </li>
            </ul>
        </div>
        <!--右侧-->
        <div class="right">

            <fieldset class="layui-elem-field layui-field-title">
                <legend>添加预定</legend>
            </fieldset>

            <form class="layui-form " action="${pageContext.request.contextPath}/Yuding/add" method="post"  onsubmit="return sumbit_sure()" >

                <div class="layui-form-item">
                    <label class="layui-form-label">房间号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="RoomNumber" placeholder="请填写房间号" autocomplete="off" class="layui-input" required>
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">客户姓名</label>
                    <div class="layui-input-inline">
                        <input type="text" name="CustomerName" placeholder="请填写客户姓名" autocomplete="off" class="layui-input" required>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">入住日期</label>
                    <div class="layui-input-inline">
                        <input type="text"  name="CheckInDate"  placeholder="请选择入住日期" autocomplete="off" class="layui-input"  id="datepicker">

<%--                        <input type="text" name="CheckInDate" placeholder="请填写入住日期" autocomplete="off" class="layui-input" required>--%>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">退房日期</label>
                    <div class="layui-input-inline">
<%--                        <input type="text" name="CheckOutDate" placeholder="请填写退房日期" autocomplete="off" class="layui-input" required>--%>
                        <input type="text"  name="CheckOutDate"  placeholder="请选择退房日期" autocomplete="off" class="layui-input"  id="datepicker1">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">预定状态</label>
                    <div class="layui-input-inline">
                        <input type="text" name="ReservationStatus" placeholder="请填写预定状态" autocomplete="off" class="layui-input" required>
                    </div>
                </div>

<%--                <div class="layui-form-item">--%>
<%--                    <label class="layui-form-label">预定日期</label>--%>
<%--                    <div class="layui-input-inline">--%>
<%--                        <input type="text" name="ReservationDate" placeholder="请填写预定日期" autocomplete="off" class="layui-input" required>--%>
<%--                    </div>--%>
<%--                </div>--%>

                <div class="layui-form-item">
                    <label class="layui-form-label">总金额</label>
                    <div class="layui-input-inline">
                        <input type="text" name="TotalAmount" placeholder="请填写总金额" autocomplete="off" class="layui-input" required>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" type="submit">立即提交</button>
                        <button class="layui-btn layui-btn-danger" type="reset">清空内容</button>
                    </div>
                </div>
            </form>

        </div>
    </div>
</div>

        <script src="../views/static/admin/js/config.js"></script>
        <script src="../views/static/admin/js/script.js"></script>
<script>
    $(function() {
        $("#datepicker").datepicker({
            dateFormat: "yy-mm-dd", // 设置日期格式
            changeMonth: true, // 允许改变月份
            changeYear: true, // 允许改变年份
            yearRange: "-100:+0", // 设置可选年份范围（这里设置为过去100年到当前年份）
            showButtonPanel: true, // 显示按钮面板（包括“今天”和“关闭”按钮）
            currentText: "今天", // 设置“今天”按钮的文本
            closeText: "关闭" // 设置“关闭”按钮的文本
        });

        $("#datepicker1").datepicker({
            dateFormat: "yy-mm-dd", // 设置日期格式
            changeMonth: true, // 允许改变月份
            changeYear: true, // 允许改变年份
            yearRange: "-100:+0", // 设置可选年份范围（这里设置为过去100年到当前年份）
            showButtonPanel: true, // 显示按钮面板（包括“今天”和“关闭”按钮）
            currentText: "今天", // 设置“今天”按钮的文本
            closeText: "关闭" // 设置“关闭”按钮的文本
        });
    });
</script>
</body>
</html>
